﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/admin/Views/Shared/List.Master"
    Inherits="System.Web.Mvc.ViewPage<Longtop.Web.WebSite.Admin.Labels.ListModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <thead>
        <tr>
            <th>
                部门
            </th>
            <th>
                任务
            </th>
            <th>
                月初人力
            </th>
            <th colspan="3">
                业绩
            </th>
            <th>
                任务达成率
            </th>
            <th>
                任务达成率排名
            </th>
        </tr>
        <tr>
            <th>
                当日业绩
            </th>
            <th>
                当月业绩
            </th>
            <th>
                人均业绩
            </th>
        </tr>
    </thead>
    <tbody>
        <% foreach (var item in Model.PagedList) {%>
        <tr>
            <td>
                <%=item.Text %>
            </td>
            <td>
                <%=item.GetMonthTask()%>
            </td>
            <td>
                <%=item.Sales.Where(x=>x.isLocked==false).Count()%>
            </td>
            <td>
                <%= item.GetTodayAchieve()%>
            </td>
            <td>
                <%= item.GetMonthAchieve(null) %>
            </td>
            <td>
                <%= item.GetMonthSaleAvg(null) %>
            </td>
            <td>
                <%=item.GetMonthRates(null).ToString("p") %>
            </td>
            <td>
                <%=item.GetMonthRatesTop(null)%>
            </td>
        </tr>
        <% } %>
    </tbody>
</asp:Content>
<asp:Content ID="Pager" ContentPlaceHolderID="Pager" runat="server">
    <%=Html.Pager(Model) %>

    <script type="text/javascript">
        $(function() {
            $('thead tr:first th:not(:contains("业绩"))').attr('rowspan', 2).parents('thead:first th,table').css('text-align', 'center');
        });
    </script>

</asp:Content>
